const post = require('express').Router();
// 添加推荐信息
post.post('/', require('./actions/post/create'));
// 根据ID删除推荐
post.delete('/:id', require('./actions/post/findByIdAndDelete'));
// 查询所有推荐
post.get('/', require('./actions/post/find'));
// 查询推荐数量
post.get('/count', require(('./actions/post/count')));
// 获取最新发布推荐(按照发布时间排序)
post.get('/lasted', require('./actions/post/lasted'));
// 获取热门推荐(按钮评论数量排序)
post.get('/recommend', require('./actions/post/recommend'));
// 获取随机推荐
post.get('/random', require('./actions/post/random'));
// 推荐点赞
post.post('/fabulous/:id', require('./actions/post/fabulous'))
// 根据地区获取推荐列表
post.get('/category/:id', require('./actions/post/category'))
// 推荐搜索
post.get('/search/:key', require('./actions/post/search'))
// 根据推荐id获取推荐信息
post.get('/:id', require('./actions/post/findById'));
// 根据ID修改推荐
post.put('/:id', require('./actions/post/findByIdAndUpdate'));


module.exports = post;